home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / XML Quik Builder1.5 / XML Quik Builder1.5.msi / Cabs.w1.cab / po.xsd14 < prev    next >
Encoding:
Extensible Markup Language  |  2002-11-24  |  2.3 KB  |  57 lines

  1. <?xml version="1.0"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  3.     <!--Stock Keeping Unit, a code for identifying products-->
  4.     <xs:annotation>
  5.         <xs:documentation xml:lang="en">Purchase order schema for Example.com.Copyright 2000 Example.com. All rights reserved.
  6.         </xs:documentation>
  7.     </xs:annotation>
  8.     <xs:complexType name="PurchaseOrderType">
  9.         <xs:sequence>
  10.             <xs:element name="shipTo" type="USAddress"></xs:element>
  11.             <xs:element name="billTo" type="USAddress"></xs:element>
  12.             <xs:element ref="comment" minOccurs="0"></xs:element> 
  13.             <xs:element name="items" type="Items"></xs:element> 
  14.         </xs:sequence>
  15.         <xs:attribute name="orderDate" type="xs:date"></xs:attribute>
  16.     </xs:complexType>
  17.     <xs:element name="purchaseOrder" type="PurchaseOrderType"></xs:element>
  18.     <xs:element name="comment" type="xs:string"></xs:element>
  19.     <xs:complexType name="USAddress">
  20.         <xs:sequence>
  21.             <xs:element name="name" type="xs:string"></xs:element>
  22.             <xs:element name="street" type="xs:string"></xs:element>
  23.             <xs:element name="city" type="xs:string"></xs:element>
  24.             <xs:element name="state" type="xs:string"></xs:element>
  25.             <xs:element name="zip" type="xs:decimal"></xs:element>
  26.         </xs:sequence>
  27.         <xs:attribute name="country" type="xs:NMTOKEN" fixed="US"></xs:attribute>
  28.     </xs:complexType>
  29.     <xs:complexType name="Items">
  30.         <xs:sequence>
  31.             <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
  32.                 <xs:complexType>
  33.                     <xs:sequence>
  34.                         <xs:element name="productName" type="xs:string"></xs:element>
  35.                         <xs:element name="quantity">
  36.                             <xs:simpleType>
  37.                                 <xs:restriction base="xs:positiveInteger">
  38.                                     <xs:maxExclusive value="100"></xs:maxExclusive>
  39.                                 </xs:restriction>
  40.                             </xs:simpleType>
  41.                         </xs:element>
  42.                         <xs:element name="USPrice" type="xs:decimal"></xs:element>
  43.                         <xs:element ref="comment" minOccurs="0"></xs:element>
  44.                         <xs:element name="shipDate" type="xs:date" minOccurs="0"></xs:element>
  45.                     </xs:sequence>
  46.                     <xs:attribute name="partNum" type="SKU" use="required"></xs:attribute> 
  47.                 </xs:complexType>
  48.             </xs:element>
  49.         </xs:sequence>
  50.     </xs:complexType>
  51.     <xs:simpleType name="SKU">
  52.         <xs:restriction base="xs:string">
  53.             <xs:pattern value="\d{3}-[A-Z]{2}"></xs:pattern> 
  54.         </xs:restriction>
  55.     </xs:simpleType>
  56. </xs:schema>
  57.